package com.home.demo;

public class Employee {
   private int id;
   private String firstname;
   private String lastname;
   private int salary;
   
   public Employee(int id,String firstname,String lastname,int salary){
	   this.id = id;
	   this.firstname = firstname;
	   this.lastname = lastname;
	   this.salary = salary;
   }
   
   public int getID(){
	   return id;
   }
   
   public String getFirstName(){
	   return firstname;
   }
   
   public String getLastName(){
	   return lastname;
   }
   
   public int getSalary(){
	   return salary;
   }
   
   public void setSalary(int salary){
	   this.salary = salary;
   }
   
   public int getAnnualSalary(){
	   return 12*salary;
   }
   
   public int raiseSalary(int percent){
	   return (int)(1+percent*0.01)*salary;
   }
   
   public String toString(){
	   return "Employee[id="+id+" name="+firstname+" "+lastname+" salary="+salary+"]";
   }
}
